From: Michael Catanzaro Date: Mon, 28 Jul 2025 11:38:51 +0000 (+0200) Subject: network: Clear connectivity queue after portal login X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~112^2^2~22 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b8b690eb88db034b606e51cff64741557a72fc86;p=gnome-shell.git network: Clear connectivity queue after portal login When full connectivity (or rather, non-portal connectivity) is achieved, we can clear all active portal helpers. Normally, the portal helper will signal that it is done, but it is implemented in a racy manner. So here let's do a comprehensive big hammer solution to guarantee the portal helper definitely gets eventually closed even if we miss the race window in the portal helper. (The race is: the portal helper checks connectivity status either immediately or within a certain amount of time after a navigation policy decision. This could theoretically be too soon, and if missed, it won't be rescheduled.) Part-of: --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 36627ca03..466ec615c 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -2209,6 +2209,9 @@ class Indicator extends SystemIndicator { return; } + if (Main.sessionMode.isGreeter) + return; + let isPortal = this._client.connectivity === NM.ConnectivityState.PORTAL; // For testing, allow interpreting any value != FULL as PORTAL, because // LIMITED (no upstream route after the default gateway) is easy to obtain @@ -2217,12 +2220,14 @@ class Indicator extends SystemIndicator { // (but in general we should only prompt a portal if we know there is a portal) if (GLib.getenv('GNOME_SHELL_CONNECTIVITY_TEST') != null) isPortal ||= this._client.connectivity < NM.ConnectivityState.FULL; - if (!isPortal || Main.sessionMode.isGreeter) - return; - this._portalHandler.addConnection( - this._mainConnection.get_id(), - this._mainConnection.get_path()); + if (isPortal) { + this._portalHandler.addConnection( + this._mainConnection.get_id(), + this._mainConnection.get_path()); + } else { + this._portalHandler.clear(); + } } _updateIcon() {